package myjava.io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * @author Yancy
 * @program springioctest
 * @create 2020-09-09
 */
public class FileInputStreamTest {
  public static void main(String[] args) {
    //
    try {
      FileInputStream fis = new FileInputStream("myFile.text");

      while (fis.available() > 0) {
        System.out.println(fis.read() + "");
      }
      fis.close();
    } catch (FileNotFoundException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
}
